import {type FC } from 'react';
import { AppstoreOutlined,BarsOutlined } from '@ant-design/icons';
import { Tabs } from 'antd';
import ComponentLib from './componentLib';
import ComponentLayer from './componentLayer';
import { LEFT_TAB_KEYS } from '@/constant';

const LeftPanel:FC = ()=>{

    const tabsItems = [
    {
      key:LEFT_TAB_KEYS.COMPONENT_LIB_KEY,
      label: (
        <span >
         <AppstoreOutlined  style={{marginLeft: 5, marginRight: 8}}/>
          组件库
        </span>
      ),
      children: <ComponentLib/>
    },
    {
      key:LEFT_TAB_KEYS.LAYERS_KEY,
      label: (
        <span>
         <BarsOutlined style={{marginRight:8}}/>
           图层
        </span>
      ),
      children: <ComponentLayer></ComponentLayer>
    }
  ]

  return <Tabs style={{padding:'10px',marginTop:'-5px'}}  defaultActiveKey={LEFT_TAB_KEYS.COMPONENT_LIB_KEY} items={tabsItems}></Tabs>
}



export default LeftPanel; 